package com.fangyi.yunmusic.controller.es;


import com.fangyi.yunmusic.pojo.es.ArtistDocument;
import com.fangyi.yunmusic.service.es.ArtistSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ArtistSearchController {

    @Autowired
    private ArtistSearchService artistSearchService;

    @GetMapping("/artist/search")
    public Object queryArtist(Integer pageNum, Integer pageSize, String query) {
//        Page<ArtistDocument> page = artistSearchService.queryArtist(pageNum, pageSize, query);
//        return page;
        return artistSearchService.queryArtistVO(pageNum, pageSize, query);
    }


}
